<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<script type="text/javascript" src="<c:url value="/js/jquery-easyui-1.5.5.6/jquery.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/jquery-easyui-1.5.5.6/jquery.easyui.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/jquery-easyui-1.5.5.6/locale/easyui-lang-zh_CN.js"/>"></script>
<link rel="stylesheet" href="<c:url value="/js/jquery-easyui-1.5.5.6/themes/icon.css"/>"/>
<link rel="stylesheet" href="<c:url value="/js/jquery-easyui-1.5.5.6/themes/default/easyui.css"/>"/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
$(function(){
	$('.xinz_Bonus_administration').linkbutton({onClick:function(){
		$(".yglz-wdm-administrationss").panel({
			href:'add_DisciplinaryPunishment'
		});	
	}});
	 $('.jz_wdm_characteristic_Bonus_administration').linkbutton({onClick:function(){
		var rowInfo = $("#yglz-wdm-administrations").datagrid('getSelected');
		if(rowInfo){
					
					var bpadId = $("#yglz-wdm-administrations").datagrid("getSelected").bpadId;
						$(".yglz-wdm-administrationss").panel({
							href:'compile_DisciplinaryPunishment?bpadId='+bpadId
						});	
				
		}else{
			$.messager.alert('错误', '对不起，操作失败，没有选中的行');
		}
		
	}}); 
	
	//删除
	$(".sc_wdm_adminustration_Bonus").linkbutton({onClick:function(){
		var rowInfo = $("#yglz-wdm-administrations").datagrid('getSelected');
		if(rowInfo){
			 $.messager.confirm('确认', '您确定要删除该条数据吗？', function(v){
				if(v){
					
					var bpadId = $("#yglz-wdm-administrations").datagrid("getSelected").bpadId;
					  $.getJSON("delete_bonus_administration",{bpadId:bpadId},function(v){
						if(v){
							$('#yglz-wdm-administrations').datagrid('reload');   
						}else{
							$.messager.alert('错误', '对不起，操作失败，原因：' + v.message);
						}
					});  
				}
				
			}); 
		}else{
			$.messager.alert('错误', '对不起，操作失败，没有选中的行');
		}
		
	}});
	
});

</script>
	<div class="easyui-panel yglz-wdm-administrationss" data-options="fit:true">
	<table  class="easyui-datagrid yglz-wdm-administrations" id="yglz-wdm-administrations" data-options="
				url:'queryByto_bonus_administration',
				pageList:[2,4,6,8,10],
				pageSize:10,
				pagination:true,
				method:'get',
				fitColumns:true,
				fit:true,
				nowrap:false,
				autoRowHeight:true,
				singleSelect:true,
				striped:true,
				toolbar:'#www-administration'
				">
			<thead>
				<tr>
					<th data-options="field:'stainId',width:50,align:'center'">员工编号</th>
					<th data-options="field:'stainName',width:50,align:'center'">员工名称</th>
					<th data-options="field:'bptName',width:50,align:'center'">奖惩类别</th>
					<th data-options="field:'bpadTime',width:50,align:'center',
							formatter:function(value,row,index){
							var date = new Date(value);
							return date.toLocaleString();
					}">奖惩日期</th>
					<th data-options="field:'bpadMoney',width:50,align:'center'">奖惩金额</th>
					<th data-options="field:'bpadRemarks',width:50,align:'center'">备注</th>
					
					
				</tr> 
			</thead>
			<tbody>
			</tbody>
		</table>
		<div  id="www-administration">
				<a href="#" class="easyui-linkbutton  xinz_Bonus_administration" data-options="iconCls:'icon-add',plain:true,text:'新增',iconAlign:'left'"></a>| 
                <a href="#" class="easyui-linkbutton jz_wdm_characteristic_Bonus_administration" data-options="iconCls:'icon-edit',plain:true,text:'编辑',iconAlign:'left'"></a>| 
                <a href="#" class="easyui-linkbutton sc_wdm_adminustration_Bonus" id="sc_wdm_adminustration_Bonus" data-options="iconCls:'icon-remove',plain:true,text:'删除',iconAlign:'left'"></a>| 
				搜索内容<input id="sswdm" class="easyui-searchbox sswdm"
						 prompt="请输入员工名"
						style="width: 200px; vertical-align:middle;"></input> 
		</div>
		
	</div>
</body>
</html> 